package com.xst.action;


import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;

import org.apache.struts2.convention.annotation.ParentPackage;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.Results;
import org.apache.struts2.json.annotations.JSON;

import com.opensymphony.xwork2.ActionSupport;
import com.xst.business.OrderDao;
import com.xst.model.Customer;
import com.xst.model.Order;
import com.xst.model.Product;
import com.xst.service.OrderService;
@ParentPackage("json-default")
@Results( {@Result(name = "json", type = "json") })
public class OrderAction extends ActionSupport{
	private OrderService orderService;
	
	private List<HashMap<String, String>> resultList = null;
	
	private Integer id;
	private Customer customer;
	private Date startDate;
	private Date endDate;
	private String status;
	private String isSign;
	private String takeName;
	private String remark;
	
	
	public OrderService getOrderService() {
		return orderService;
	}


	public void setOrderService(OrderService orderService) {
		this.orderService = orderService;
	}





	public Integer getId() {
		return id;
	}


	public void setId(Integer id) {
		this.id = id;
	}


	public Customer getCustomer() {
		return customer;
	}


	public void setCustomer(Customer customer) {
		this.customer = customer;
	}


	public Date getStartDate() {
		return startDate;
	}


	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}


	public Date getEndDate() {
		return endDate;
	}


	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}


	public String getStatus() {
		return status;
	}


	public void setStatus(String status) {
		this.status = status;
	}


	public String getIsSign() {
		return isSign;
	}


	public void setIsSign(String isSign) {
		this.isSign = isSign;
	}


	public String getTakeName() {
		return takeName;
	}


	public void setTakeName(String takeName) {
		this.takeName = takeName;
	}


	public String getRemark() {
		return remark;
	}


	public void setRemark(String remark) {
		this.remark = remark;
	}

	
	

	public List<HashMap<String, String>> getResultList() {
		return resultList;
	}


	public void setResultList(List<HashMap<String, String>> resultList) {
		this.resultList = resultList;
	}


	public String execute() throws Exception {

		return super.execute();
	}
	
	public String getOrderList() throws Exception{
		resultList = new ArrayList<HashMap<String, String>>();
		resultList = orderService.getallinfo();
		return "json";
	}

}
